home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1564 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  973 b 

  1. Path: news.vanderbilt.edu!news
  2. From: "Marcus H. Mendenhall" <mendenm@ctrvax.vanderbilt.edu>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Splitting String ?
  5. Date: Mon, 15 Jan 1996 08:46:34 +0000
  6. Organization: Vanderbilt University, Nashville, TN, USA
  7. Message-ID: <30FA146A.761F@ctrvax.vanderbilt.edu>
  8. References: <HAKOLA.96Jan12151128@jung.hut.fi>
  9. NNTP-Posting-Host: 129.59.235.1
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b5 (Macintosh; I; PPC)
  14.  
  15. Petri Hakola wrote:
  16. >         Have I missed something (again:) or why doesn't this code
  17. >         work?                                                 - P 
  18.  
  19. One problem is with allocation of space: when you call newname with 
  20. a constant string, you are trying to append directly onto the end of 
  21. the string, which can have disastrous result: overwriting of another 
  22. variable or, in a protected memory system, a fault (the string might 
  23. be in read-only space).
  24.